home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga News 96
/
Amiga News 96.iso
/
dpat
/
dpat129
/
amighpv2a
/
examples
/
factoriel.s
< prev
next >
Wrap
Text File
|
1977-12-31
|
805b
|
75 lines
include entries.i
con(5) DOCODE
Debut con(5) Fin-Debut
J equ $800F5
I equ $800FA
GOSBVL $0679B
D0=(5) $800F5
A=DAT1 A
DAT0=A A
C=A A
D1=C
A=DAT1 A
DAT0=A A
LCHEX $02911
A=DAT0 A
?C#A A
GOYES LAB0
GOTO LAB1
LAB0
GOSBVL $067D2
LAHEX $00202
GOSBVL $05023
LAB1
D1=D1+ 5
D0=(5) $800F5
A=DAT1 A
DAT0=A A
C=A A
D0=(5) $800FA
DAT0=C A
LCHEX $00000
A=DAT0 A
?C=A A
GOYES LAB2
GOTO LAB3
LAB2
GOSBVL $067D2
LAHEX $00203
GOSBVL $05023
LAB3
LAB4
LCHEX $00001
D0=(5) $800FA
A=DAT0 A
?C#A A
GOYES LAB5
GOTO LAB6
LAB5
D0=(5) $800FA
C=DAT0 A
C=C-1 A
DAT0=C A
D0=(5) $800F5
A=DAT0 A
GOSBVL $03991
C=B A
DAT0=C A
GOTO LAB4
LAB6
D0=(5) $800F5
A=DAT0 A
R0=A A
GOSBVL $067D2
GOSBVL $06537
GOSBVL $0679B
LAHEX $800F5
D0=A
GOSBVL $067D2
A=DAT0 A
D0=D0+ 5
PC=(A)
Fin